package com.demo.controller

import org.springframework.stereotype.Controller
import org.springframework.ui.ModelMap
import org.springframework.web.bind.annotation.RequestMapping

@Controller
@RequestMapping("/view")
class ViewController {
    @RequestMapping("/index")
    fun index(result: ModelMap): String {
        result["userList"] = arrayOf("张三", "李四")
        result["sex"] = 1
        return "index"
    }
}
